package cn.com.twoke.application.game.mario.core.ecs.component.render.text;

import cn.com.twoke.application.game.mario.core.ecs.component.render.RenderComponent;
import cn.com.twoke.application.game.mario.core.ecs.component.render.RenderHandler;
import lombok.Builder;
import lombok.Data;

import java.awt.*;

@Data
@Builder(toBuilder = true)
@RenderHandler(TextRenderComponentHandler.class)
public class TextRenderComponent implements RenderComponent {

    @Builder.Default
    private String text = "";
    @Builder.Default
    private Integer offsetX = 0;
    @Builder.Default
    private Integer offsetY = 0;
    @Builder.Default
    private Color color = Color.WHITE;


    @Override
    public Integer getIndex() {
        return 0;
    }

    @Override
    public Boolean isDisplay() {
        return Boolean.TRUE;
    }
}
